﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;
using System.Configuration;
using Ext.Net;
using System.Data;
using Newtonsoft.Json;
using System.IO;
using System.Text;

namespace TCDC_System.Content.TransectionData
{
    public partial class pos : System.Web.UI.Page
    {
        private Member_profileModel objAddProfile;
        private tcdc_mst_member_type objMemberType;
        private tcdc_mst_user objUser;
        private tcdc_trn_user_campaign objUserCampaign;
        private tcdc_mst_title objTitle;
        private tcdc_mst_site objSite;
        private tcdc_mst_address objAddress;
        
        
        protected void Page_Init(object sender, EventArgs e)
        {
          //  this.UserAdd1.GridStore = StoreUser;
        }

        protected void Page_Load(object sender, EventArgs e)
        {

           

            objMemberType = new tcdc_mst_member_type();
            objMemberType.strConn = ConfigurationManager.AppSettings["ConnString"];

            objAddProfile = new Member_profileModel();
            objAddProfile.strConn = ConfigurationManager.AppSettings["ConnString"];

            objUser = new tcdc_mst_user();
            objUser.strConn = ConfigurationManager.AppSettings["ConnString"];

            objUserCampaign = new tcdc_trn_user_campaign();
            objUserCampaign.strConn = ConfigurationManager.AppSettings["ConnString"];

            objTitle=new tcdc_mst_title();
            objTitle.strConn = ConfigurationManager.AppSettings["ConnString"];

            objSite = new tcdc_mst_site();
            objSite.strConn = ConfigurationManager.AppSettings["ConnString"];

            objAddress = new tcdc_mst_address();
            objAddress.strConn = ConfigurationManager.AppSettings["ConnString"];


            if (!X.IsAjaxRequest)
            {

   
            }
        }

        protected void SelectMemberType(object sender, DirectEventArgs e)
        {
  
        }

  

        protected void ClickSearch(object sender, DirectEventArgs e)
        {
            Member_profileModel i = new Member_profileModel();
            DataTable dtAddProfile = objAddProfile.getByObject(i);

        }

        protected void rowSelectMembers(object sender, DirectEventArgs e)
        {
     
        }

        protected void SavePos(object sender, DirectEventArgs e)
        {
           Ext.Net.X.Js.AddScript("window.location = 'member_profile.aspx';");
        }


  
        protected void BrowseImage(object sender, DirectEventArgs e)
        {
            X.Msg.Show(new MessageBoxConfig
            {
                Buttons = MessageBox.Button.OK,
                Icon = MessageBox.Icon.INFO,
                Title = "Image Click",
                Message = "คุณคลิกที่รูปสมาชิก"
            });
        }


        protected void StoreUser_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            //StoreUser.DataSource = GetUser();
            //StoreUser.DataBind();
        }

 

     
    }
}